# 实现一个具有加减乘除,整除,取余,乘方,开方的计算器
from math import sqrt


# 加Add
def add(a, b):
    return a + b;


# 减subtract
def subtract(a, b):
    return a - b


# 乘multiply
def multiply(a, b):
    return a * b


# 除divide
def divide(a, b):
    return a / b


# 整除divide
def whole_divide(a, b):
    return a // b


# 取余remainder
def get_remainder(a, b):
    return a % b


# 乘方power
def power(a, b):
    return a ** b


# 开方extract
def extract(a):
    return sqrt(a)


if __name__ == '__main__':
    a = 16
    b = 3
    print(a, '+', b, '=', add(a, b))
    print(a, '-', b, '=', subtract(a, b))
    print(a, '*', b, '=', multiply(a, b))
    print(a, '/', b, '=', divide(a, b))
    print(a, '//', b, '=', whole_divide(a, b))
    print(a, '%', b, '=', get_remainder(a, b))
    print(a, '**', b, '=', power(a, b))
    print(a, '√￣' '=', extract(a))
